package com.ruoyi.wms.domain.bo.stock;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.common.mybatis.core.domain.BaseEntity;
import com.ruoyi.wms.domain.entity.stock.PurchaseRequests;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 采购申请业务对象 wms_purchase_requests
 *
 * @author zcc
 * @date 2024-11-20
 */

@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = PurchaseRequests.class, reverseConvertGenerate = false)
public class PurchaseRequestsBo extends BaseEntity {

    /**
     * 主键id
     */
    private Long id;

    /**
     * 单号
     */
    private String requestNumber;

    /**
     * 仓库ID
     */
    @NotNull(message = "仓库ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long warehouseId;

    /**
     * 库区id
     */
    @NotNull(message = "库区id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long areaId;

    /**
     * 采购人ID
     */
    @NotNull(message = "采购人ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long requesterId;

    /**
     * 供货商ID
     */
    @NotNull(message = "供货商ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long merchantId;

    /**
     * 申请时间
     */
    private LocalDateTime requestDate;

    /**
     * 预期交货时间
     */
    private LocalDateTime expectedDeliveryDate;

    /**
     * 采购状态
     */
    private Integer purchaseStatus;

    /**
     * 备注
     */
    private String remark;

    /**
     * 采购申请单明细
     */
    private List<PurchaseRequestDetailsBo> purchaseRequestsDetails;


}
